package sz.com.postoffice.jxyzwgcase.service;

import sz.com.postoffice.jxyzwgcase.core.TableDataInfo;
import sz.com.postoffice.jxyzwgcase.pojo.DailyIncome;
import sz.com.postoffice.jxyzwgcase.pojo.DailyIncomeSummary;
import sz.com.postoffice.jxyzwgcase.pojo.DailyIncomeSummaryList;

import java.util.List;

/**
 * @ClassName DailyIncomeSummaryService
 * @Deacription
 * @Author jmx
 * @Date 2020/11/12 18:29
 * @Version 1.0
 */
public interface DailyIncomeSummaryService extends BaseService<DailyIncomeSummary>{
    List<DailyIncomeSummary> queryAll(DailyIncomeSummary dailyIncomeSummary);
    List<DailyIncomeSummary> getByUserAndDate(String userCode, String startDate, String endDate);
    TableDataInfo queryListPeriod(DailyIncomeSummaryList dailyIncomeSummaryList);

    boolean insertSummaryByDaily(DailyIncome dailyIncome);
    boolean updateTodayIncome(DailyIncome dailyIncome);
    boolean updateIncomeFromApp(DailyIncome dailyIncome);
    boolean updateHistoryIncome(DailyIncome dailyIncome);
    Integer sumExpressCount(String userCode, String startTime, String endTime);
    Integer sumStandardMailCount(String userCode, String startTime, String endTime);
    Integer sumFragmentedMailCount(String userCode, String startTime, String endTime);
    Integer sumDelivery(String userCode, String startTime, String endTime);
    Integer sumVisit(String userCode, String startTime, String endTime);

    Double sumExpressIncome(String userCode, String startTime, String endTime);
    Double sumStandardMailIncomme(String userCode, String startTime, String endTime);
    Double sumFragmentedMailIncome(String userCode, String startTime, String endTime);
    DailyIncomeSummary getDailyIncomeByUser(DailyIncomeSummary dailyIncomeSummary);
    Integer getDailyVisitByUser(String userCode, String statDate);
}
